from django.conf.urls.defaults import patterns, include, url

from models import Word
from django.views.generic import ListView
import views

urlpatterns = patterns('',
    url(r'^words$', views.get_words),
    url(r'^$', ListView.as_view(
        queryset = Word.get_top10_list(),
    )),
    
    url(r'^word/(\d+)/?$', views.get_word),
    url(r'^word/(\d+)/vote/(.*)$', views.vote),
    url(r'^word/(\d+)/load', views.load_comment),
    
    url(r'^user/?$', views.user_new),
    url(r'^user/?$', views.user_login),
    url(r'^user/(\d+)/?$', views.user),
)